package com.example.demo.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.IdClass;

import org.hibernate.annotations.Table;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Entity
@javax.persistence.Table(name="shop")
@IdClass(Zhujian.class)
public class CarGood {
	@Id
	String goodId;
	@Id
	String userId;
	@Column(name = "name", nullable = true, length = 200)
	String name;
	@Column(name = "img", nullable = true, length = 200)
	String img;
	@Column(name = "discount", nullable = true, length = 20)
	String discount;
	@Column(name = "price", nullable = true, length = 20)
	String price;
	@Column(name = "num", nullable = true, length = 20)
	String num;

	public String getGoodId() {
		return goodId;
	}
	public void setGoodId(String goodId) {
		this.goodId = goodId;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public String getDiscount() {
		return discount;
	}
	public void setDiscount(String discount) {
		this.discount = discount;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public String getNum() {
		return num;
	}
	public void setNum(String num) {
		this.num = num;
	}
	@Override
	public String toString() {
		return "CarGood [goodId=" + goodId + ", name=" + name + ", img=" + img + ", discount=" + discount + ", price="
				+ price + ", num=" + num + ", userId=" + userId + "]";
	}
	
}
